<?php
if ($_SERVER['SERVER_ADDR'] == '127.0.0.1'){
    // -------- 开发环境 --------
    define('ENVIRONMENT', 'development');
    define('APISERVER', 'http://xiaohei.me/api/');
    define('DB_CONNECT_ERR_LOG', SERVER_ROOT . 'log/');

    $DBCONF = array(
        'XIAOHEI'   => array('HOST' => '127.0.0.1', 'USER' => 'root', 'PASSWORD' => '000000', 'DB' => 'xiaohei'),
        'WEIBO'     => array('HOST' => '127.0.0.1', 'USER' => 'root', 'PASSWORD' => '000000', 'DB' => 'weibo'),
    );

}else{
    // -------- 生产环境 --------
    define('ENVIRONMENT', 'production');
    define('APISERVER', 'http://50.6.98.20/api/');
    define('DB_CONNECT_ERR_LOG', SERVER_ROOT . 'log/');

    $DBCONF = array(
        'XIAOHEI'   => array('HOST' => 'mysql902.ixwebhosting.com', 'USER' => 'C357979_XIAOHEI', 'PASSWORD' => 'XiaoHei1268', 'DB' => 'C357979_XIAOHEI'),
        'WEIBO'     => array('HOST' => 'mysql902.ixwebhosting.com', 'USER' => 'C357979_XIAOHEI', 'PASSWORD' => 'XiaoHei1268', 'DB' => 'C357979_WEIBO'),
    );
}


// HiTools 微博应用信息
define( "WB_AKEY" , '3439514029' );
define( "WB_SKEY" , 'fe40bf2fb5869cb26ef022f78782bc56' );
define( "WB_CALLBACK_URL" , 'http://apps.weibo.com/hitools/callback.php' );
